﻿using System;
using System.Collections.Generic;
using System.Text;

namespace T.FAS.Runtime.Action.SPI
{
    [Serializable]
    public class ActionPluginInfo
    {
        /// <summary>
        /// 主键标识
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 插件编号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 插件名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 所属的元数据类型
        /// </summary>
        public string MetaTypeID { get; set; }
        /// <summary>
        /// 插件动作方法,例如AF_Start
        /// </summary>
        public string ActionCode { get; set; }
        /// <summary>
        /// 插件动作编号
        /// </summary>
        public int SortOrder { get; set; }
        /// <summary>
        /// 插件是否启用
        /// </summary>
        public bool IsEnable { get; set; }
        /// <summary>
        /// 插件目标实现
        /// </summary>
        public string TargetAssembly { get; set; }
        /// <summary>
        /// Http请求的SID
        /// </summary>
        public string RemoteInvokeSID { get; set; }
        /// <summary>
        /// 是否强制本地调用
        /// </summary>
        public bool IsForceLocal { get; set; }
        public ActionPluginInfo Copy()
        {
            return new ActionPluginInfo()
            {
                ID = this.ID,
                Code = this.Code,
                Name = this.Name,
                MetaTypeID = this.MetaTypeID,
                ActionCode = this.ActionCode,
                SortOrder = this.SortOrder,
                IsEnable = this.IsEnable,
                TargetAssembly = this.TargetAssembly,
                RemoteInvokeSID = this.RemoteInvokeSID,
                IsForceLocal = this.IsForceLocal
            };
        }

    }
}
